package book;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: hp
 * Date: 2024-03-11
 * Time: 21:43
 */
public class BookList {
    private Book[] books = new Book[10];
    private int useSize;

    public Book getBook(int pos) {
        return books[pos];
    }

    public int getUseSize() {
        return useSize;
    }

    public boolean isFull() {
        if(this.useSize == books.length) {
            return true;
        }
        return false;
    }
    public void setBook(int pos,Book book) {
        books[pos] = book;
    }
    public void setUseSize(int useSize) {
        this.useSize = useSize;
    }

    public BookList() {
        books[0] = new Book("三国演义","罗贯中",10.5,"小说");
        books[1] = new Book("西游记","吴承恩",12.5,"小说");
        books[2] = new Book("红楼梦","曹雪芹",16.5,"小说");
        this.useSize = 3;
    }
}
